package com.frontop.system.modules.attendance.workover.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.frontop.system.modules.attendance.workover.model.AttendanceWorkOver;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.frontop.system.modules.attendance.workover.vo.AttendanceWorkOverVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 考勤-加班记录表 Mapper 接口
 * </p>
 *
 * @author YangJia
 * @since 2022-01-11
 */
@Mapper
public interface AttendanceWorkOverMapper extends BaseMapper<AttendanceWorkOver> {
    List<JSONObject> getAllWorkOverByUserName(String userName);

    /**
     * 可调休列表
     * @param page
     * @param vo
     * @return
     */
    Page<AttendanceWorkOver> selectAttendanceWorkOverPage(Page<AttendanceWorkOver> page, @Param("param") AttendanceWorkOverVO vo);

    /**
     * 考勤异常列表
     * @param page
     * @param vo
     * @return
     */
    Page<AttendanceWorkOver> selectWorkeOverAbnormal(Page<AttendanceWorkOver> page, @Param("param") AttendanceWorkOverVO vo);


    Integer updateStatus(Integer id);

    JSONObject selectWorkeOverStatistics(@Param("param")Map<String,Object> map);

}
